package svc

import (
	"baidu-dev/api/internal/config"
	"baidu-dev/baidurpc/baidurpcclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config   config.Config
	BaiDuRpc baidurpcclient.Baidurpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		BaiDuRpc: baidurpcclient.NewBaidurpc(zrpc.MustNewClient(c.BaiDuRpc)),
	}
}
